package top.tagao.yygh.hosp.repository;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
import top.tagao.yygh.model.hosp.Hospital;

import java.util.List;

/**
 * @author fu-xiao-liu
 * @Date 2022/3/3 15:40
 */
@Repository
public interface HospitalRepository extends MongoRepository<Hospital, String> {

    /**
     * @date  通过hoscode判断是否存在hospital
     * @param hoscode
     * @return top.tagao.yygh.model.hosp.Hospital
     */
    Hospital getHospitalByHoscode(String hoscode);

    /**
     * @date   通过医院名称模糊查询医院列表
     * @param hosname
     * @return java.util.List<top.tagao.yygh.model.hosp.Hospital>
     */
    List<Hospital> findHospitalByHosnameLike(String hosname);
}
